feat(workflow-executor): include mcpServerId + mcpServerName in MCP step logs (PRD-418)#1616
Merged
Conversation
4 new issues
|
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (4)
🛟 Help
|
christophebrun-forest
added a commit
that referenced
this pull request
Jun 2, 2026
…rt log context Address review on PR #1616: - unify naming on `mcpServerName` across RemoteToolFetcher, factory and McpStepExecutor - factory test asserts the executor's getExtraLogContext() output instead of reading a private field Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tep logs (PRD-418)
Adds a getExtraLogContext() hook on BaseStepExecutor (default {}) merged into
logCtx, overridden by McpStepExecutor to stamp every MCP step log line with
mcpServerId and mcpServerName. RemoteToolFetcher.fetch() now resolves the
serverName from the scoped config Record key and returns { tools, serverName },
forwarded to the executor via StepExecutorFactory. Diagnostic log lines in the
fetcher also carry mcpServerName.
fixes PRD-418
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rt log context Address review on PR #1616: - unify naming on `mcpServerName` across RemoteToolFetcher, factory and McpStepExecutor - factory test asserts the executor's getExtraLogContext() output instead of reading a private field Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b6cfb71 to
98bce7b
Compare
82dd057
into
feat/prd-214-server-step-mapper
26 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Adds two fields to every MCP step execution log line so operators can unambiguously identify which MCP server a log entry refers to when several are configured:
mcpServerId— DB id of the targeted MCP server (canonical).mcpServerName— human-readable name (theRecordkey fromgetMcpServerConfigs()).How
BaseStepExecutor— newgetExtraLogContext()hook (default{}) merged intologCtx, so all step log lines (started/completed, errors, timeouts) pick up extra fields. Base class stays free of step-specific knowledge.McpStepExecutor— overridesgetExtraLogContext()to return{ mcpServerId, mcpServerName }.RemoteToolFetcher.fetch()— now resolvesserverNamefrom the scoped config Record key and returns{ tools, serverName }; diagnostic log lines (not advertised…,failed to load tools) also carrymcpServerName.StepExecutorFactory— forwardsserverNameto theMcpStepExecutorconstructor.mcpServerIdis canonical;mcpServerNameis the human-readable label (not guaranteed unique at the DB level — a user MCP can collide with a Forest connector). Logging both is what makes the entry unambiguous.Tests
remote-tool-fetcher: new{ tools, serverName }shape, serverName resolution,mcpServerNamein diagnostic logs.mcp-step-executor:Step execution started/completedlines includemcpServerId+mcpServerName;undefinedwhen unresolved.runner: end-to-end forwarding ofserverNameto the executor.Full suite: 836/836 green, lint clean, build OK.
fixes PRD-418
🤖 Generated with Claude Code
Note
Include
mcpServerIdandmcpServerNamein MCP step executor log linesRemoteToolFetcher.fetch()now returnsFetchRemoteToolsResult({ tools, mcpServerName? }) instead ofRemoteTool[], resolvingmcpServerNamefrom the scoped config record key.BaseStepExecutoradds a protectedgetExtraLogContext()hook so subclasses can inject type-specific fields into every log line.McpStepExecutoroverridesgetExtraLogContext()to includemcpServerIdandmcpServerName, andStepExecutorFactorypasses the resolved name through on construction.fetchRemoteToolsmust now destructure{ tools, mcpServerName }from the result instead of using it directly as an array.Macroscope summarized 98bce7b.